import { defineStore } from 'pinia'
import { ref } from 'vue'
import {
  CustomFormItem,
  CustomOption,
  OptionType,
} from '@/pages/member/views/application/types'
import { useDevelopHook } from '@/pages/member/views/application/composables/develop.ts'
//创建小仓库
const useAppDevStore = defineStore('AppDev', () => {
  const { formLabelType, formOptionData, formOption } = useDevelopHook()

  const optionForm = ref<OptionType[][]>([])
  const formItemKey = ref('')
  const formItemIndexType = ref(false)
  const formItem = ref<CustomFormItem[]>([])
  const customOption = ref<CustomOption>({})

  return {
    formLabelType,
    formOptionData,
    formOption,

    optionForm,
    formItemKey,
    formItemIndexType,
    formItem,
    customOption,
  }
})
export default useAppDevStore
